package castle.defense.project;

import android.graphics.Canvas;

/**
 * The class defining an item that may be purchased and/or used
 * by the player. Items have an associated cost and avatar, and 
 * may have a specific game level at which they become available
 * to the player to purchase from the store.
 * 
 * @author KevinJoslyn
 *
 */
public class Item extends Renderable {

	public int cost;
	public int avatar;
	public boolean purchased;
	
	/** Basic item constructor
	 * 
	 * @param cost		The item's cost, in credits.
	 * @param avatar	The hash key representing this item's avatar (image)
	 * @param reqLevel	The game level at which this item becomes
	 * 					available for purchase from the store.
	 */
	public Item(int cost, int avatar) {
		
		this.cost = cost;
		this.avatar = avatar;
		purchased = false;
	}

	public void draw(Canvas c) {
		//in general: do nothing
	}

	public void update(long milli) {
		//in general: do nothing
	}

	/**
	 * Items do not need their own height, they will be painted with the respected object
	 */
	public int height() {
		//in general: do nothing
		return 0;
	}

	public boolean destroy() {
		//in general: do nothing
		return false;
	}
}
